// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import "babel-polyfill"
import Vue from 'vue'
import router from './router'
import VueResource from 'vue-resource'
import ElementUI from 'element-ui'
import $ from 'jquery'
import common from './common'
import VueVideoPlayer from 'vue-video-player'
import 'video.js/dist/video-js.css'
import 'element-ui/lib/theme-chalk/index.css'
import 'bootstrap/js/modal.js'
import 'bootstrap/js/dropdown.js'
import 'bootstrap/js/tooltip.js'
import 'font-awesome/css/font-awesome.css'
import 'summernote'
import 'summernote/dist/lang/summernote-zh-CN.js'
import 'summernote/dist/summernote.css'
import 'animate.css'
import App from './App'

import '../static/common.css'


Vue.use(VueResource);
Vue.use(ElementUI)
Vue.use(VueVideoPlayer)
Vue.http.interceptors.push(function(request, next) { //拦截器
    request.credentials = false;
    next((res) => {
        //401 登陆过期跳转
        if (res.data.status == 401) {
            router.push("/login");
            common.setCookie('sessionId', '')
        }
    })
})

Vue.config.productionTip = false


/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    template: '<App/>',
    components: { App }
})